package cz.data.domain.market.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import cz.data.common.base.BaseEntity;
import cz.data.domain.market.model.dto.TableApiSettings;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "market_table_api", autoResultMap = true)
public class TableApiEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "API名称")
    private String apiName;
    @ApiModelProperty(value = "API路径")
    private String apiUrl;
    @ApiModelProperty(value = "数据源")
    private String sourceId;
    @ApiModelProperty(value = "数据库表")
    private String tableId;
    @TableField(value = "settings", typeHandler = JacksonTypeHandler.class)
    @ApiModelProperty(value = "API配置")
    private TableApiSettings settings;
}
